package com.szh.broadcastreceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class MyReceiver extends BroadcastReceiver {


    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction()=="com.szh.broadcastdemo");
        String str  = intent.getStringExtra("msg");
        Log.d("第二个项目接受者", str);
        Toast.makeText(context, str+"*******", Toast.LENGTH_SHORT).show();
    }
}
